﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace POVRay {
    [PRBlock("photons")]
    public class GlobalPhotons : Block {
        [PRParam("count")]
        public int? Count { get; set; }
        //or
        [PRParam("spacing")]
        public float? Spacing { get; set; }

        [PRParam()]
        public Gather Gather { get; set; }

        [PRParam()]
        public PhotonsMedia Media { get; set; }

        [PRParam("jitter")]
        public float? Jitter { get; set; }

        [PRParam("adc_bailout")]
        public float? ADCBailout { get; set; }

        [PRParam("max_trace_level")]
        public int? MaxTraceLevel { get; set; }

        [PRParam("autostop")]
        public float? Autostop { get; set; }

        [PRParam()]
        public PhotonsRadius Radius { get; set; }

        [PRParam()]
        public ExpandThresholds ExpandThresholds { get; set; }

        [PRParam()]
        public CacheFile CacheFile { get; set; }

        public GlobalPhotons() {
        }

        public static GlobalPhotons PhotonsWithCount(int count) {
            GlobalPhotons photons = new GlobalPhotons();
            photons.Count = count;
            return photons;
        }

        public static GlobalPhotons PhotonsWithSpacing(float spacing) {
            GlobalPhotons photons = new GlobalPhotons();
            photons.Spacing = spacing;
            return photons;
        }

        public override string ToString(int level) {
            return this.POVRayString(level);
        }
    }
}
